﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpWeb
{
    public abstract class AbstractComponent:IComponent
    {
        public AbstractComponent()
        {
        }
        private string _ComponentName;
        /// <summary>
        /// 组件名称，用于在后台程序中识别组件，注意区别于标签的name属性
        /// </summary>
        public string ComponentName
        {
            get { return _ComponentName; }
            set { _ComponentName = value; }
        }

        

        internal void Initialize(ComponentContext context)
        {
            this.InitComponent(context);
        }
        /// <summary>
        /// 在派生类中重写，用于初始化组件
        /// </summary>
        protected virtual void InitComponent(ComponentContext context)
        { 
        
        }
    }
}
